package com.ruoyi.jiuzai.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.jiuzai.mapper.CangkumingxiMapper;
import com.ruoyi.jiuzai.domain.Cangkumingxi;
import com.ruoyi.jiuzai.service.ICangkumingxiService;

/**
 * 物资出入库明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-21
 */
@Service
public class CangkumingxiServiceImpl implements ICangkumingxiService 
{
    @Autowired
    private CangkumingxiMapper cangkumingxiMapper;

    /**
     * 查询物资出入库明细
     * 
     * @param mingId 物资出入库明细主键
     * @return 物资出入库明细
     */
    @Override
    public Cangkumingxi selectCangkumingxiByMingId(Long mingId)
    {
        return cangkumingxiMapper.selectCangkumingxiByMingId(mingId);
    }

    /**
     * 查询物资出入库明细列表
     * 
     * @param cangkumingxi 物资出入库明细
     * @return 物资出入库明细
     */
    @Override
    public List<Cangkumingxi> selectCangkumingxiList(Cangkumingxi cangkumingxi)
    {
        return cangkumingxiMapper.selectCangkumingxiList(cangkumingxi);
    }

    /**
     * 新增物资出入库明细
     * 
     * @param cangkumingxi 物资出入库明细
     * @return 结果
     */
    @Override
    public int insertCangkumingxi(Cangkumingxi cangkumingxi)
    {
        return cangkumingxiMapper.insertCangkumingxi(cangkumingxi);
    }

    /**
     * 修改物资出入库明细
     * 
     * @param cangkumingxi 物资出入库明细
     * @return 结果
     */
    @Override
    public int updateCangkumingxi(Cangkumingxi cangkumingxi)
    {
        return cangkumingxiMapper.updateCangkumingxi(cangkumingxi);
    }

    /**
     * 批量删除物资出入库明细
     * 
     * @param mingIds 需要删除的物资出入库明细主键
     * @return 结果
     */
    @Override
    public int deleteCangkumingxiByMingIds(Long[] mingIds)
    {
        return cangkumingxiMapper.deleteCangkumingxiByMingIds(mingIds);
    }

    /**
     * 删除物资出入库明细信息
     * 
     * @param mingId 物资出入库明细主键
     * @return 结果
     */
    @Override
    public int deleteCangkumingxiByMingId(Long mingId)
    {
        return cangkumingxiMapper.deleteCangkumingxiByMingId(mingId);
    }
}
